package com.czkj.hwz.decorate.Activity;

import android.os.Build;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import com.czkj.hwz.decorate.R;
import com.czkj.hwz.decorate.adapter.PicAdapter;
import com.hejunlin.superindicatorlibray.CircleIndicator;
import com.hejunlin.superindicatorlibray.LoopViewPager;
import com.king.base.BaseActivity;

public class CenterOperationActivity extends BaseActivity {

    @Override
    public void initUI() {
        if (Build.VERSION.SDK_INT >= 21){
            Window window = getWindow();
            //取消设置透明状态栏,使 ContentView 内容不再覆盖状态栏
            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            //需要设置这个 flag 才能调用 setStatusBarColor 来设置状态栏颜色
            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            //设置状态栏颜色
            window.setStatusBarColor(getResources().getColor(R.color.yellow));
        }
        setContentView(R.layout.activity_center_operation);
        getSupportActionBar().hide();
        LoopViewPager viewPager=findView(R.id.viewpager);
        CircleIndicator indicator=findView(R.id.indicator1);
        viewPager.setAdapter(new PicAdapter(this));
        viewPager.setLooperPic(true);
        indicator.setViewPager(viewPager);
    }

    @Override
    public void initData() {

    }

    @Override
    public void addListeners() {

    }
    public void OnClick(View v) {
        switch (v.getId()) {
            case R.id.iv_back:
                finish();
            break;
        }
    }
}
